package org.shj.jvm.oom;

/**
 * -verbose:gc -Xss128k -XX:+PrintGCDetails
 * 
 * @author Administrator
 *
 */
public class StackOverflow {
	private static int cnt = 0;
	public void count(){
		cnt++;
		System.out.println("The depth of stack: " + cnt);
		count();
	}

	public static void main(String[] args) {
		StackOverflow sof = new StackOverflow();
		try{
			sof.count();
		}catch(Exception e){
			
			e.printStackTrace();
			
		}

	}

}
